USE Ingrooves;
GO

--tables
SELECT * 
FROM sys.tables;

--columns
select *
from sys.columns
where name = 'ContractAuthority'

--information related to a db object
EXEC sp_help 'ContractAuthority'

--GETTING TABLES WITH THAT HAVE THE COLUMN ContractAuthority
--using information_schema
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG = 'Ingrooves'		--database
AND TABLE_SCHEMA = 'dbo'		--owner
--AND TABLE_NAME = 'Customer'+
and COLUMN_NAME = 'ContractAuthority'

--columns of Contract table
SELECT *
FROM sys.columns
WHERE OBJECT_NAME(object_id) = 'Contract'